package com.stark.core.query;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.stark.core.properties.Constants;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 用户查询条件。
 * @author Ben
 */
@Data
@Accessors(chain = true)
public class UserCondition implements Serializable {
	
	private static final long serialVersionUID = -8017808886694047990L;

	/** 姓名 */
	@ApiModelProperty("姓名")
	private String name;
	
	/** 性别 */
	@ApiModelProperty(value = "性别: 0-男,1-女,2-其他", allowableValues = "0,1,2")
	private Integer sex;
	
	/** 出生日期最小值 */
	@DateTimeFormat(pattern = Constants.PATTERN_DATE)
	@JsonFormat(pattern = Constants.PATTERN_DATE, timezone = "GMT+8")
	@ApiModelProperty("出生日期最小值")
    private Date birthdayMin;
	
	/** 出生日期最大值 */
	@DateTimeFormat(pattern = Constants.PATTERN_DATE)
	@JsonFormat(pattern = Constants.PATTERN_DATE, timezone = "GMT+8")
	@ApiModelProperty("出生日期最大值")
    private Date birthdayMax;

}
